namespace AutoTask.Model.DB
{
    using System;
    using AutoTask.Model;
    using SqlSugar;

    [SugarTable("AutoTaskItem")]
    public class AutoTaskItemModel: AutoTaskItem
    {
        [SugarColumn(IsPrimaryKey =true)]
        public Guid Id { get; set; }

        public Guid TaskId { get; set; }

        public string ItemTitle { get; set; }

        public int ItemSort { get; set; }

        public TaskSendType SendType { get; set; }
        [SugarColumn(IsJson =true,ColumnDataType ="nvarchar(max)")]
        public SendParam SendParam { get; set; }

        public int? TimeOut { get; set; }

        public short? RetryNum { get; set; }

        public TaskSetup FailSetup { get; set; }

        public int? FailNextSetup { get; set; }

        public TaskSetup SuccessSetup { get; set; }

        public int? NextSetup { get; set; }

        public TaskLogRange LogRange { get; set; }

        public bool IsSuccess { get; set; }

        public long? ErrorCode { get; set; }

        public bool IsEnable { get; set; }

        public DateTime? LastExecTime { get; set; }
    }
}
